package com.wuwei.business.controller;

import com.wuwei.business.domain.BusCar;
import com.wuwei.business.domain.BusRent;
import com.wuwei.business.service.BusRentService;
import com.wuwei.common.core.controller.BaseController;
import com.wuwei.common.core.domain.model.LoginUser;
import com.wuwei.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 内容: SSM
 * 作者: weishao
 */
@RestController
@RequestMapping("business/rent")
public class RentConntroller extends BaseController {
    @Autowired
    private BusRentService busRentService;

    @GetMapping("list")
    public TableDataInfo list(BusRent busRent){
        startPage();
        LoginUser loginUser = getLoginUser();
        List<BusRent> list = busRentService.selectRentPage(loginUser,busRent);
        return getDataTable(list);
    }
}
